package org.lqq.serverRegisterAndFinder.serverFinder.eureka;

import com.netflix.discovery.shared.transport.EurekaTransportConfig;

/**
 * Created by 李清泉 on 2017/11/2.
 *
 * @remark
 */
public class MyEurekaTransportConfig implements EurekaTransportConfig{

    private int sessionedClientReconnectIntervalSeconds = 20 * 60;

    private double retryableClientQuarantineRefreshPercentage = 0.66;

    private int bootstrapResolverRefreshIntervalSeconds = 5 * 60;

    private int applicationsResolverDataStalenessThresholdSeconds = 5 * 60;

    private int asyncResolverRefreshIntervalMs = 5 * 60 * 1000;

    private int asyncResolverWarmUpTimeoutMs = 5000;

    private int asyncExecutorThreadPoolSize = 5;

    private String readClusterVip;

    private String writeClusterVip;

    private boolean bootstrapResolverForQuery = true;

    private String bootstrapResolverStrategy;

    private boolean applicationsResolverUseIp = false;

    @Override
    public int getSessionedClientReconnectIntervalSeconds() {
        return sessionedClientReconnectIntervalSeconds;
    }

    @Override
    public double getRetryableClientQuarantineRefreshPercentage() {
        return retryableClientQuarantineRefreshPercentage;
    }

    @Override
    public int getApplicationsResolverDataStalenessThresholdSeconds() {
        return applicationsResolverDataStalenessThresholdSeconds;
    }

    @Override
    public boolean applicationsResolverUseIp() {
        return true;
    }

    @Override
    public int getAsyncResolverRefreshIntervalMs() {
        return asyncResolverRefreshIntervalMs;
    }

    @Override
    public int getAsyncResolverWarmUpTimeoutMs() {
        return asyncResolverWarmUpTimeoutMs;
    }

    @Override
    public int getAsyncExecutorThreadPoolSize() {
        return asyncExecutorThreadPoolSize;
    }

    @Override
    public String getWriteClusterVip() {
        return null;
    }

    @Override
    public String getReadClusterVip() {
        return null;
    }

    @Override
    public String getBootstrapResolverStrategy() {
        return null;
    }

    @Override
    public boolean useBootstrapResolverForQuery() {
        return true;
    }
}
